12th Class (HSSC-II) Computer SLO Based Key Point Notes
(National Book Foundation - As Federal Textbook Board, Islamabad Based on National Curriculum Pakistan 2023-2024 and Onward prescribed by Federal Board of Intermediate and Secondary Education, Islamabad, and All Pakistan Boards)
(National Book Foundation - As Federal Textbook Board, Islamabad
Based on National Curriculum Pakistan 2023-2024 and Onward prescribed by Federal Board of Intermediate and Secondary Education, Islamabad, and All Pakistan Boards)
{Contact WhatsApp # 03339719149 for Class-XII Computer Science Complete SLO-Based Key Points notes in pdf format as well as in PowerPoint Presentation for preparing/delivering the Lectures}
************************************
************************************
👉👉👉 Computer Science 12th Class Notes (Main Page)
************************************
Unit 3: Object-Oriented Programming in C++
3.2.1 C++ Constants and Variables
Constant:
- A constant is a quantity that cannot be changed during program execution.
- It can be a number, a character, or a character string. A character string is a sequence of any number of characters.
- Examples: 42, 7.25, ‘s’, “computer” etc.
- A constant is a quantity that cannot be changed during program execution.
- It can be a number, a character, or a character string. A character string is a sequence of any number of characters.
- Examples: 42, 7.25, ‘s’, “computer” etc.
Variable:
- A quantity whose value may change during the execution of the program is called a variable.
- A variable is a space in a computer’s memory, used to store data and given a name for easy reference. OR
- In C language, a variable is a memory location that is identified by a name to store a data of particular type.
- A quantity whose value may change during the execution of the program is called a variable.
- A variable is a space in a computer’s memory, used to store data and given a name for easy reference. OR
- In C language, a variable is a memory location that is identified by a name to store a data of particular type.
Rules for Naming a Variable:
Following are the rules for naming variables in C:
- A variable name may consist of digits, upper case, and lower case alphabets, and underscore symbols i.e. “_”
- The first character of a variable name must be an alphabet character or underscore.
- Keywords/Reserved words of C++ cannot be used as variable names.
- Special symbols such as $, @, %, #, etc. are not allowed.
- Two variables cannot be of the same name.
- C is a case-sensitive language. Variable names with the same spelling but different cases are treated as different variable names.
- A meaningful name should be given to the variable which can help to understand the purpose of the variable.
- Blank space or comma is not allowed.
- A variable name may consist of digits, upper case, and lower case alphabets, and underscore symbols i.e. “_”
- The first character of a variable name must be an alphabet character or underscore.
- Keywords/Reserved words of C++ cannot be used as variable names.
- Special symbols such as $, @, %, #, etc. are not allowed.
- Two variables cannot be of the same name.
- C is a case-sensitive language. Variable names with the same spelling but different cases are treated as different variable names.
- A meaningful name should be given to the variable which can help to understand the purpose of the variable.
- Blank space or comma is not allowed.
👇👇👇👇👇👇👇👇👇👇👇👇
👇👇👇👇👇👇👇👇👇👇👇👇
************************************👉👉👉 Computer Science 12th Class Notes (Main Page)
************************************
Shortcut Links For:
1. 5th Class All Subjects Notes
2. 8th Class All Subjects Notes
3. Easy English Grammar Notes
1. Website for School and College Level Physics 2. Website for School and College Level Mathematics 3. Website for Single National Curriculum Pakistan - All Subjects Notes
© 2023 & onwards Academic Skills and Knowledge (ASK)
Note: Write me in the comments box below for any query and also Share this information with your class-fellows and friends.
1. Website for School and College Level Physics
2. Website for School and College Level Mathematics
3. Website for Single National Curriculum Pakistan - All Subjects Notes
0 Comments
Start Tuition (in Pakistan or Abroad) from Experienced Online Teachers.
Contact WhatsApp for tutoring and Assignment help on +923339719149